from pymongo import MongoClient
import json

def storeTree(database, rootid):
    f = open("json/" + rootid + "_tree.json")
    str_content = f.read()
    f.close()
    jsonized = json.loads(str_content)
    result = dict()
    result["rootid"] = rootid
    result["tree"] = jsonized
    database.tree.insert_one(result)
    # done